#include <stdio.h>
#include <string.h>
#include <assert.h>

char *my_strcat(char *des, const char *src);

int main() {
	char a[] = "asdfg";
	char b[] = "12345";

	strcat(a, b);

	printf("strcat:%s\n", a);
	printf("\n");

	char c[] = "12345";

	my_strcat(a, c);
	printf("my_strcat:%s\n", a);
	printf("my_strcat:%s\n", my_strcat(a, b));
	return 0;
}

char *my_strcat(char *des, const char *src) {
	assert(des && src);

	char *cur = des;
	while (*cur != '\0') {
		cur++;
	}

	while (*cur++ = *src++) {
		;
	}

	return des;
}